<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
        <script  src="js/jsbn.js" type="text/javascript"></script>
        <script  src="js/prng4.js" type="text/javascript"></script>
        <script  src="js/rng.js" type="text/javascript"></script>
        <script  src="js/rsa.js" type="text/javascript"></script>
        <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
</head>
<body>
<input type="button" onclick="do_encrypt()" value="加密" />
    <form action="/">
                      验证码 <input id="" type="text">
    </form>
</body>
<script type="text/javascript">
var rsa_key="D8428B6E05C11F44983A2D4D6E2D8636981B4674F64FE9BA3B13F3076ECBD372F65CC6EC096669AE9164D1CC9EF584AD35AE03CEF0C26977815CFFF193E3D5435786E26BDDF6F73EF245DE762D69B0E291F593CE4B0B628E2B154A6CDF9BF5D66C715BC50240F68B941F6471FAF1F0BD9CD217D4518991E9C0E7AD90427C3970D687A5284C805A0CF468BD7B9B278EEA3DBF4F19BD58D8347BF532853AED4E3D9A8346C00C957E0557BACA83D577B223493E2356B8265501706DE96F3425C45A89D17F70AF0AEA0364BC12F46643EF758630281C335678F4822591328A73DA554AD6998BE5F144FBD1D3DA2107FA5E6A9FED60A3A47DE86B68B6D97609B87BAF";
function do_encrypt() {
	var rsa = new RSAKey();
    rsa.setPublic(rsa_key, "10001");
    var res = rsa.encrypt("sapling.123");
    console.log(res);
}
</script>
</html>